win_w, win_h = ScrW(), ScrH()
HUDWidth = (GetConVar("HudW") or  CreateClientConVar("HudW", 240, true, false)):GetInt()
HUDHeight = (GetConVar("HudH") or CreateClientConVar("HudH", 115, true, false)):GetInt()
local Health = 0

local function DrawHealth()
	draw.RoundedBox(0,50,win_h-50,300*(LocalPlayer():Health()/1000),10, Color( 255,0,0,255))
	draw.DrawText("Health:","DefaultBold",25,win_h-50,Color( 228,169,12,255),1)
end

local function DrawArrmor()
	draw.RoundedBox(1,50,win_h-65,300*(LocalPlayer():Armor()/100),10, Color( 0,0,255,255))
	draw.DrawText("Armor:","DefaultBold",25,win_h-65,Color( 228,169,12,255),1)
end

local function DrawCash()
	draw.DrawText("$"..tostring(cash),"DefaultBold",65,win_h-80,Color( 0,255,0,255),1)
	draw.DrawText("Cash:","DefaultBold",25,win_h-80,Color( 228,169,12,255),1)
end

function draw_hud()
draw.RoundedBox(6,2,win_h-100-30,500,100,Color( 50,50,50,190))
DrawHealth()
DrawArrmor()
DrawCash()
end 

hook.Add("HUDPaint", "draw_hud",draw_hud)
 


function GM:HUDShouldDraw(name)
	if name == "CHudHealth" or
		name == "CHudBattery" or
		name == "CHudSuitPower" or
		(HelpToggled and name == "CHudChat") then
			return false
	else
		return true
	end
end